<?php
/**
 * <https://y.st./>
 * Copyright © 2018 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'More about transmission',
	'<{subtitle}>' => 'Written in <span title="Communications and Networking">CS 2204</span> by <a href="https://y.st./">Alex Yst</a>, finalised on 2018-04-25',
	'<{copyright year}>' => '2018',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<h2>Crosstalk</h2>
<p>
	Crosstalk is when a transmission causes interference in nearby transmissions (Merriam-Webster, 2018).
	Strangely, while our reading assignment touched upon how to reduce crosstalk, it didn&apos;t actually cover what it is or why we should want to reduce it in the first place.
	Once we look it up in a dictionary though, the reason for wanting it reduced becomes obvious.
	The reading assignment also didn&apos;t cover how twisted pairs reduce crosstalk, only <strong>*that*</strong> they do.
	Again, we can learn from an outside resource.
	The basic concept is that both wires get exposed to outside interference equally (The Linux Information Project, 2005).
	For example, if there&apos;s interference on one side of an untwisted pair, one of the wires will take the brunt of the exposure to it.
	However, in a twisted pair, each wire gets hit about evenly.
	My understanding is that interference still happens, but instead of one wire taking so much interference that the signal becomes corrupted beyond recognition, both wires take a lesser amount of interference.
	The receiver is still able to decipher the signal at that point because of its binary nature.
	The signal doesn&apos;t have to come through perfectly, it only needs each bit to remain on the correct side of the differentiating threshold.
</p>
<h2>Uplink and downlink</h2>
<p>
	If you have a basic understanding of how transmissions are sent and understood, it should be completely obvious why a different frequency is used for uplink and downlink traffic in satellites.
	For anyone else, the textbook spells it out: it allows traffic to travel bidirectionally (Tanenbaum &amp; Wetherall, n.d.).
	Basically, if the uplink and downlink were on the same frequency, the signals sent to the satellite would interfere with those sent from it, and vice versa.
	The only ways to prevent this are to either have the communications occur unidirectionally or to transmit on separate frequencies.
	Using the unidirectional method, the direction could flip when needed, but a sender would need to wait for the receiver to stop talking before it could transmit its own message.
	You also need to remember that signals take time to travel.
	It may <strong>*look*</strong> like it&apos;s safe to begin a transmission, but the other party has begun a new transmission already.
	By using two separate frequencies, both parties can talk and listen at the same time.
</p>
<h2>Circuit switching versus packet switching</h2>
<h3>Circuits</h3>
<p>
	In circuit switching, a path is plotted out when the communication is to begin.
	This same path is used for every packet of the communication.
	Once the communication is complete, the connection can be terminated; that is, the conceptual path previously established will then be deleted.
	If further communication is needed later, a new path will need to be plotted out, which may or may not use the same physical links as before.
	However, in packet switching, this isn&apos;t the case.
	Instead, packets are sent individually, and may take entirely different paths through the network, as long as those paths lead to the same destination (Tanenbaum &amp; Wetherall, n.d.).
</p>
<h3>Network congestion</h3>
<p>
	In circuit switching, congestion simply does not exist.
	If there&apos;s too much data going through the lines for a path to be established, a different path will be established instead, if possible.
	If not, the connection will fail and will potentially need to be tried again later.
	On the other hand, packet switching, no dedicated path is set up, so packets just go wherever switches send them.
	Congestion can occur if too many packets are travelling through the same switch and the switch is unable to process the load as quickly as desired (Tanenbaum &amp; Wetherall, n.d.).
</p>
<h3>Inherent order</h3>
<p>
	In circuit switching, a single path is used.
	As a result, there&apos;s no race; the packets are unable to pass by each other and change their order before arrival.
	In packet switching, the reverse is true.
	With each packet sent individually and potentially along separate routes, it&apos;s quite probable that packets will arrive out of order.
	This can happen any time a later packet takes a faster route than an earlier packer.
	This means that the receiver may end up with misordered packets, so if order is at all important, some sort of method for determining the intended order will need to be built into the protocol.
	Such an unscrambling technique is never needed with circuit switching (Tanenbaum &amp; Wetherall, n.d.).
</p>
<h3>Delegation of resources</h3>
<p>
	While circuit switching doesn&apos;t suffer from congestion, it&apos;s also unable to make the most of available resources during slower periods or switch routes if segments along the chosen path become more occupied.
	For better or worse, all packets must travel the same path.
	However, in packet switching, each packet can take a different path.
	Packets can be sent along the then-believed-best route as their time comes up.
	If some packets don&apos;t seem to get through quickly, an alternate path can be used for the next packets.
	If several lines aren&apos;t busy, packets can be sent out over each of these lines to make the best use of the available lines (Tanenbaum &amp; Wetherall, n.d.).
</p>
<h2>Exercise 2.7, modified</h2>
<pre>         B
         |
         S4
         |
A---S1---S2---S3---C
         |
         D</pre>
<ol start="0">
	<li>
		A sends to D
	</li>
	<li>
		D sends to A
	</li>
	<li>
		A sends to B
	</li>
</ol>
<p>
	When A sends to D, no switch knows where anything is, so the packet is broadcast through the entire network.
	As a result, all switches learn the location of the sender, A.
	When D sends to A, all switches have already learned where A is, so the packet takes a direct route.
	Only the switches along that path, S1 and S2, learn where D is.
	When A sends to B, it&apos;s still unknown by any switch where B is, so the packet in again broadcast through the entire network.
	However, nothing new is learned by the switches, as they&apos;re only able to learn from <strong>*sender*</strong> information, and they all already know where the sender, A, is.
</p>
<ul>
	<li>
		S1 has learned the location of: A, D
	</li>
	<li>
		S2 has learned the location of: A, D
	</li>
	<li>
		S3 has learned the location of: A
	</li>
	<li>
		S4 has learned the location of: A
	</li>
</ul>
<div class="APA_references">
	<h2>References:</h2>
	<p>
		The Linux Information Project. (2005, September 28). Twisted pair: used in Cat 5 network cables to reduce crosstalk. Retrieved from <a href="http://linfo.org/twisted_pair.html"><code>http://linfo.org/twisted_pair.html</code></a>
	</p>
	<p>
		Merriam-Webster. (2018, March 14). Cross Talk | Definition of Cross Talk by Merriam-Webster. Retrieved from <a href="https://www.merriam-webster.com/dictionary/cross%20talk"><code>https://www.merriam-webster.com/dictionary/cross%20talk</code></a>
	</p>
	<p>
		Tanenbaum, A. S., &amp; Wetherall, D. J. (n.d.). 2: The Physical Layer. Retrieved from <a href="https://my.uopeople.edu/pluginfile.php/268182/mod_book/chapter/150450/Chapter%202.pdf"><code>https://my.uopeople.edu/pluginfile.php/268182/mod_book/chapter/150450/Chapter%202.pdf</code></a>
	</p>
</div>
END
);
